package com.ikingtech.platform.service.system.user.configuration;

import com.ikingtech.framework.sdk.component.api.CompDepartmentApi;
import com.ikingtech.framework.sdk.component.api.CompUserApi;
import com.ikingtech.platform.service.system.user.service.*;
import com.ikingtech.platform.service.system.user.service.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tie yan
 */
@Configuration
public class CompUserConfiguration {

    @Bean
    @ConditionalOnMissingBean({CompUserApi.class})
    public CompUserApi compUserApi(UserRepository service, UserDeptRepository userDeptService, UserTenantRepository userTenantService, CompDepartmentApi departmentApi, ModelConverter converter) {
        return new CompUserService(service, userDeptService, userTenantService, departmentApi, converter);
    }
}
